<?php
header ("Content-Type:text/html; charset= utf-8");
require_once ('config.php');
if(empty($_GET['type'])){
	echo "forbidden";
	exit;
}
$type=$_GET['type'];
switch ($type)
{
	case 'leadership':
		$title="领导班子";
		break;
	case 'organization':
		$title="内设机构";
		break;
	case 'profile':
		$title="单位简介";
		break;
	default:
		echo "forbidden!";
		exit();
}
$smarty->assign("title",$title);

$filename=WEBSITEURL."/".ADMINLOC."/data/default/$type.txt";
if(!file_exists($filename)){
	echo "forbidden";
	exit();
}
	$info=file_get_contents($filename);
	$smarty->assign("info",$info);
	
	$system=new System();
	$sys_style=$system->getSysStyle();
	$channel_model=WEBSITEURL."/templates/$sys_style/channel/about.htm";
	
	if(!file_exists($channel_model))
	{
		echo "模版文件丢失";
		exit;
	};
	$smarty->template_dir=WEBSITEURL."/templates/$sys_style/channel";
	$smarty->assign("template_dir","templates/$sys_style");
	$smarty->display($channel_model,md5("about.php?type=$type"));